<!-- HTML header for doxygen 1.8.18-->
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <meta name="generator" content="Doxygen 1.8.16" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>LEAF: LEAF/Inc/leaf-midi.h Source File</title>
    <link href="tabs.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="dynsections.js"></script>
    <script type="text/javascript" src="../js/iframeResizer.contentWindow.min.js"></script>
    <!-- <script src="/js/template.js"></script> -->
     <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script> 
    <link href="doxygen.css" rel="stylesheet" type="text/css" />
    <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
    <!-- <link rel="stylesheet" href="/css/tachyons.css" type="text/css" /> -->
</head>
<body class="bg-washed-green black-70 ph0 sans-serif" onload="iframeResizePipe()">
    <div>
        <!-- do not remove this div, it is closed by doxygen! -->
        <div id="titlearea">
            <table cellspacing="0" cellpadding="0">
                <tbody>
                    <tr>
                    </tr>
                </tbody>
            </table>
        </div>
        <!-- end header part -->
    </div>
</body>
</html><!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_127e6aa213d41105176fe0c3bbb2560c.html">LEAF</a></li><li class="navelem"><a class="el" href="dir_2638202b9749e6ce2c919e410b7e2f43.html">Inc</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">leaf-midi.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*==============================================================================</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> </span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> leaf-midi.h</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> Created: 30 Nov 2018 11:29:26am</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> Author:  airship</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> </span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> ==============================================================================*/</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160; </div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#ifndef LEAF_MIDI_H_INCLUDED</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#define LEAF_MIDI_H_INCLUDED</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160; </div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;    </div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    </div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &quot;leaf-global.h&quot;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &quot;leaf-mempool.h&quot;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &quot;leaf-math.h&quot;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#include &quot;leaf-envelopes.h&quot;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    </div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <span class="comment">// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160; </div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="preprocessor">#define STACK_SIZE 128</span></div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tStack</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    {</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        </div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        <span class="keywordtype">int</span> data[STACK_SIZE];</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        uint16_t pos;</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        uint16_t size;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        uint16_t capacity;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        <span class="keywordtype">int</span> ordered;</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    } _tStack;</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    </div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="keyword">typedef</span> _tStack* tStack;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    </div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tstack.html#ga0f59d25b2a62af281cb7e5a6337a662a">tStack_init</a>                 (tStack* <span class="keyword">const</span> stack, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tstack.html#gac6a330c5c8f6fc6138b22c157e527c81">tStack_initToPool</a>           (tStack* <span class="keyword">const</span> stack, tMempool* <span class="keyword">const</span> pool);</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tstack.html#gabf348064227f55c30cd2bcac3d899881">tStack_free</a>                 (tStack* <span class="keyword">const</span> stack);</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    </div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tstack.html#ga3b5483c9a7cd996e3c62ea9f0895437c">tStack_setCapacity</a>          (tStack* <span class="keyword">const</span> stack, uint16_t cap);</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tstack.html#ga909528e236aa47978e91227961841ab5">tStack_addIfNotAlreadyThere</a> (tStack* <span class="keyword">const</span> stack, uint16_t item);</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tstack.html#gabd861307ff5e290b4ae8e45507b9903b">tStack_add</a>                  (tStack* <span class="keyword">const</span> stack, uint16_t item);</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tstack.html#ga559464a399b9606909f9f57e190ead7b">tStack_remove</a>               (tStack* <span class="keyword">const</span> stack, uint16_t item);</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tstack.html#ga3d053d583ed2c643a1a4ea00818d4f8a">tStack_clear</a>                (tStack* <span class="keyword">const</span> stack);</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tstack.html#ga1684ca55f7c9d42e2994eed03b329700">tStack_first</a>                (tStack* <span class="keyword">const</span> stack);</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tstack.html#ga995a3cb4b43476c387f4fd431af923ef">tStack_getSize</a>              (tStack* <span class="keyword">const</span> stack);</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tstack.html#ga8ca0bdad1bce63d0da4cfa6e233ece98">tStack_contains</a>             (tStack* <span class="keyword">const</span> stack, uint16_t item);</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tstack.html#ga6e0aef2c8bc0f9432b7a2a6541f21550">tStack_next</a>                 (tStack* <span class="keyword">const</span> stack);</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tstack.html#ga15d80c513c339ff2c87fb96fcfca9353">tStack_get</a>                  (tStack* <span class="keyword">const</span> stack, <span class="keywordtype">int</span> index);</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    </div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tPoly</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    {</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;        </div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;        </div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;        tStack stack;</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;        tStack orderStack;</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;        </div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;        tRamp* ramps;</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;        <span class="keywordtype">float</span>* rampVals;</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;        <span class="keywordtype">int</span>* firstReceived;</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;        <span class="keywordtype">float</span> glideTime;</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;        <span class="keywordtype">int</span> pitchGlideIsActive;</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;        </div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;        <span class="keywordtype">int</span> numVoices;</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;        <span class="keywordtype">int</span> maxNumVoices;</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;        </div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;        <span class="comment">//int voices[POLY_NUM_MAX_VOICES][2];</span></div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        <span class="keywordtype">int</span>** voices;</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;        </div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;        <span class="keywordtype">int</span> notes[128][2];</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        </div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;        <span class="keywordtype">int</span> CCs[128];</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;        </div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;        uint8_t CCsRaw[128];</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;        </div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;        <span class="keywordtype">int</span> lastVoiceToChange;</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;        </div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;        <span class="keywordtype">float</span> pitchBend;</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;        tRamp pitchBendRamp;</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;        </div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;        <span class="keywordtype">int</span> currentNote;</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;        <span class="keywordtype">int</span> currentVoice;</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;        <span class="keywordtype">int</span> currentVelocity;</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;        <span class="keywordtype">int</span> maxLength;</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    } _tPoly;</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;    </div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    <span class="keyword">typedef</span> _tPoly* tPoly;</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;    </div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpoly.html#gaf530a73c1d8d8d3e20403c9f33c0ab2e">tPoly_init</a>                  (tPoly* <span class="keyword">const</span> poly, <span class="keywordtype">int</span> maxNumVoices, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpoly.html#ga9a3b088e0d32366b6d5f675794becf15">tPoly_initToPool</a>            (tPoly* <span class="keyword">const</span> poly, <span class="keywordtype">int</span> maxNumVoices, tMempool* <span class="keyword">const</span> pool);</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpoly.html#ga03c02b27b16f700b55d8536256d310b5">tPoly_free</a>                  (tPoly* <span class="keyword">const</span> poly);</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    </div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tpoly.html#ga0a52befe767ed6ea96b26d53952a37ea">tPoly_noteOn</a>                (tPoly* <span class="keyword">const</span> poly, <span class="keywordtype">int</span> note, uint8_t vel);</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tpoly.html#gaad8376b6c55995e763ce26d084d23a67">tPoly_noteOff</a>               (tPoly* <span class="keyword">const</span> poly, uint8_t note);</div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpoly.html#ga5abdfc6cd4b26b74647cb23a822b0f38">tPoly_orderedAddToStack</a>     (tPoly* <span class="keyword">const</span> poly, uint8_t note);</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpoly.html#gaf3aae31d4b20eb71be39351989bc06d1">tPoly_setNumVoices</a>          (tPoly* <span class="keyword">const</span> poly, uint8_t numVoices);</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpoly.html#ga9ddfc026e440e208064ce48d655ee317">tPoly_setPitchGlideActive</a>   (tPoly* <span class="keyword">const</span> poly, <span class="keywordtype">int</span> isActive);</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpoly.html#ga12e5fba9072b6e7d91d50a2e3c82bc87">tPoly_setPitchGlideTime</a>     (tPoly* <span class="keyword">const</span> poly, <span class="keywordtype">float</span> t);</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpoly.html#ga8608941b79fe9ba1b8e92b5a8046a915">tPoly_setPitchBend</a>          (tPoly* <span class="keyword">const</span> poly, <span class="keywordtype">float</span> pitchBend);</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpoly.html#ga8dad5daee7f10d0bb59e96ad55ec0402">tPoly_setBendGlideTime</a>      (tPoly* <span class="keyword">const</span> poly, <span class="keywordtype">float</span> t);</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpoly.html#ga1f6a93b108ac8654eaa860575d2f1cd5">tPoly_setBendSamplesPerTick</a> (tPoly* <span class="keyword">const</span> poly, <span class="keywordtype">float</span> t);</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpoly.html#gaf30b4a4aabd43c297d49258acf8e0cb3">tPoly_tickPitch</a>             (tPoly* <span class="keyword">const</span> poly);</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpoly.html#ga4391da808d7e621ac86944f745a2f729">tPoly_tickPitchGlide</a>        (tPoly* <span class="keyword">const</span> poly);</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tpoly.html#gaf1bfa43e0337d0e090d3aa5b074b7825">tPoly_tickPitchBend</a>         (tPoly* <span class="keyword">const</span> poly);</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tpoly.html#gad85e4d10bb7e8fa66797ad632186459b">tPoly_getNumVoices</a>          (tPoly* <span class="keyword">const</span> poly);</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tpoly.html#ga45962abd5bf3321cedfdb64ab05fd0d7">tPoly_getNumActiveVoices</a>    (tPoly* <span class="keyword">const</span> poly);</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tpoly.html#ga39f47e13c92644d07852a7794fe896c4">tPoly_getPitch</a>              (tPoly* <span class="keyword">const</span> poly, uint8_t voice);</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tpoly.html#gaec4318990ce680cc96df942fd9bd5473">tPoly_getKey</a>                (tPoly* <span class="keyword">const</span> poly, uint8_t voice);</div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tpoly.html#ga1f946c78feaa7db4f443bd105e4c7310">tPoly_getVelocity</a>           (tPoly* <span class="keyword">const</span> poly, uint8_t voice);</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tpoly.html#ga328c5f9e8f8fb7f521298676ab6c5944">tPoly_isOn</a>                  (tPoly* <span class="keyword">const</span> poly, uint8_t voice);</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160; </div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;    <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160; </div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tSimplePoly</div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;    {</div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;        </div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;        tStack stack;</div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160; </div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;        <span class="keywordtype">int</span> numVoices;</div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;        <span class="keywordtype">int</span> maxNumVoices;</div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;        <span class="keywordtype">int</span>** voices;</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;        <span class="keywordtype">int</span> stealing_on;</div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;        <span class="keywordtype">int</span> recover_stolen;</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160; </div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;        <span class="keywordtype">int</span> notes[128][2];</div>
<div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;    } _tSimplePoly;</div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160; </div>
<div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;    <span class="keyword">typedef</span> _tSimplePoly* tSimplePoly;</div>
<div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160; </div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsimplepoly.html#gaad03d289d4860fd6fc570e359da13f15">tSimplePoly_init</a>                  (tSimplePoly* <span class="keyword">const</span> poly, <span class="keywordtype">int</span> maxNumVoices, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsimplepoly.html#ga67391919fd2cf8b80b80b9a74f0a2f02">tSimplePoly_initToPool</a>            (tSimplePoly* <span class="keyword">const</span> poly, <span class="keywordtype">int</span> maxNumVoices, tMempool* <span class="keyword">const</span> pool);</div>
<div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsimplepoly.html#gae112285fcb27b1b6822b5db474b892d7">tSimplePoly_free</a>                  (tSimplePoly* <span class="keyword">const</span> poly);</div>
<div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;    </div>
<div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tsimplepoly.html#ga704023c95d0eef34c4746a4489626bd9">tSimplePoly_noteOn</a>                (tSimplePoly* <span class="keyword">const</span> poly, <span class="keywordtype">int</span> note, uint8_t vel);</div>
<div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tsimplepoly.html#ga12fc7c78f1e2fcd0016a438374eb4ec3">tSimplePoly_noteOff</a>               (tSimplePoly* <span class="keyword">const</span> poly, uint8_t note);</div>
<div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsimplepoly.html#ga6d801960d20e16f81eff12b420a904c8">tSimplePoly_deactivateVoice</a>         (tSimplePoly* <span class="keyword">const</span> polyh, uint8_t voice);</div>
<div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tsimplepoly.html#ga668c915adab45224835268b08c7f4c80">tSimplePoly_markPendingNoteOff</a>      (tSimplePoly* <span class="keyword">const</span> polyh, uint8_t note);</div>
<div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tsimplepoly.html#ga9a78b4407716cd48468420194f39d811">tSimplePoly_findVoiceAssignedToNote</a> (tSimplePoly* <span class="keyword">const</span> polyh, uint8_t note);</div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsimplepoly.html#gae11bb769f332621148bfe4e9e966cc1d">tSimplePoly_setNumVoices</a>          (tSimplePoly* <span class="keyword">const</span> poly, uint8_t numVoices);</div>
<div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tsimplepoly.html#ga574023fdcde9863f60a88c5171595628">tSimplePoly_getNumVoices</a>          (tSimplePoly* <span class="keyword">const</span> poly);</div>
<div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tsimplepoly.html#ga7927a37f0b05301c58923ee0bd9b1376">tSimplePoly_getNumActiveVoices</a>    (tSimplePoly* <span class="keyword">const</span> poly);</div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tsimplepoly.html#ga04edeaf26303e4fd57988b3144063590">tSimplePoly_getPitch</a>              (tSimplePoly* <span class="keyword">const</span> poly, uint8_t voice);</div>
<div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tsimplepoly.html#gae147f59b6da64f3af94407da5a6ec3db">tSimplePoly_getPitchAndCheckActive</a>(tSimplePoly* <span class="keyword">const</span> polyh, uint8_t voice);</div>
<div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tsimplepoly.html#ga85311b798b65407dcd4de68a8ed7d52d">tSimplePoly_getVelocity</a>           (tSimplePoly* <span class="keyword">const</span> poly, uint8_t voice);</div>
<div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tsimplepoly.html#ga1a55f7b4f9e8926acb9f6126c8e80633">tSimplePoly_isOn</a>                  (tSimplePoly* <span class="keyword">const</span> poly, uint8_t voice);</div>
<div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160; </div>
<div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;    <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;    </div>
<div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;}</div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160; </div>
<div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;<span class="preprocessor">#endif // LEAF_MIDI_H_INCLUDED</span></div>
<div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160; </div>
<div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;<span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160; </div>
<div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160; </div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="agroup__tstack_html_gabd861307ff5e290b4ae8e45507b9903b"><div class="ttname"><a href="group__tstack.html#gabd861307ff5e290b4ae8e45507b9903b">tStack_add</a></div><div class="ttdeci">void tStack_add(tStack *const stack, uint16_t item)</div><div class="ttdoc">Add a value to the stack.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:60</div></div>
<div class="ttc" id="agroup__tpoly_html_ga03c02b27b16f700b55d8536256d310b5"><div class="ttname"><a href="group__tpoly.html#ga03c02b27b16f700b55d8536256d310b5">tPoly_free</a></div><div class="ttdeci">void tPoly_free(tPoly *const poly)</div><div class="ttdoc">Free a tPoly from its mempool.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:311</div></div>
<div class="ttc" id="agroup__tpoly_html_ga39f47e13c92644d07852a7794fe896c4"><div class="ttname"><a href="group__tpoly.html#ga39f47e13c92644d07852a7794fe896c4">tPoly_getPitch</a></div><div class="ttdeci">float tPoly_getPitch(tPoly *const poly, uint8_t voice)</div><div class="ttdoc">Get the current pitch of a given voice.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:584</div></div>
<div class="ttc" id="agroup__tpoly_html_ga328c5f9e8f8fb7f521298676ab6c5944"><div class="ttname"><a href="group__tpoly.html#ga328c5f9e8f8fb7f521298676ab6c5944">tPoly_isOn</a></div><div class="ttdeci">int tPoly_isOn(tPoly *const poly, uint8_t voice)</div><div class="ttdoc">Get the current play state of a given voice.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:602</div></div>
<div class="ttc" id="agroup__tstack_html_ga0f59d25b2a62af281cb7e5a6337a662a"><div class="ttname"><a href="group__tstack.html#ga0f59d25b2a62af281cb7e5a6337a662a">tStack_init</a></div><div class="ttdeci">void tStack_init(tStack *const stack, LEAF *const leaf)</div><div class="ttdoc">Initialize a tStack to the default mempool of a LEAF instance.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:23</div></div>
<div class="ttc" id="agroup__tsimplepoly_html_ga574023fdcde9863f60a88c5171595628"><div class="ttname"><a href="group__tsimplepoly.html#ga574023fdcde9863f60a88c5171595628">tSimplePoly_getNumVoices</a></div><div class="ttdeci">int tSimplePoly_getNumVoices(tSimplePoly *const poly)</div><div class="ttdoc">Get the current number of voices available to play notes.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:864</div></div>
<div class="ttc" id="agroup__tstack_html_ga3b5483c9a7cd996e3c62ea9f0895437c"><div class="ttname"><a href="group__tstack.html#ga3b5483c9a7cd996e3c62ea9f0895437c">tStack_setCapacity</a></div><div class="ttdeci">void tStack_setCapacity(tStack *const stack, uint16_t cap)</div><div class="ttdoc">Set the capacity of the stack.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:174</div></div>
<div class="ttc" id="agroup__tsimplepoly_html_ga704023c95d0eef34c4746a4489626bd9"><div class="ttname"><a href="group__tsimplepoly.html#ga704023c95d0eef34c4746a4489626bd9">tSimplePoly_noteOn</a></div><div class="ttdeci">int tSimplePoly_noteOn(tSimplePoly *const poly, int note, uint8_t vel)</div><div class="ttdoc">Add a note with a given velocity to the poly handler.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:660</div></div>
<div class="ttc" id="agroup__tpoly_html_ga9ddfc026e440e208064ce48d655ee317"><div class="ttname"><a href="group__tpoly.html#ga9ddfc026e440e208064ce48d655ee317">tPoly_setPitchGlideActive</a></div><div class="ttdeci">void tPoly_setPitchGlideActive(tPoly *const poly, int isActive)</div><div class="ttdoc">Set whether pitch glide over note changes in voices is active.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:544</div></div>
<div class="ttc" id="agroup__tpoly_html_gaf30b4a4aabd43c297d49258acf8e0cb3"><div class="ttname"><a href="group__tpoly.html#gaf30b4a4aabd43c297d49258acf8e0cb3">tPoly_tickPitch</a></div><div class="ttdeci">void tPoly_tickPitch(tPoly *const poly)</div><div class="ttdoc">Execute all tick-rate changes in the poly handler's pitch, including glide and bend.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:332</div></div>
<div class="ttc" id="agroup__tpoly_html_gaad8376b6c55995e763ce26d084d23a67"><div class="ttname"><a href="group__tpoly.html#gaad8376b6c55995e763ce26d084d23a67">tPoly_noteOff</a></div><div class="ttdeci">int tPoly_noteOff(tPoly *const poly, uint8_t note)</div><div class="ttdoc">Remove a note from the poly handler.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:438</div></div>
<div class="ttc" id="agroup__tpoly_html_ga8dad5daee7f10d0bb59e96ad55ec0402"><div class="ttname"><a href="group__tpoly.html#ga8dad5daee7f10d0bb59e96ad55ec0402">tPoly_setBendGlideTime</a></div><div class="ttdeci">void tPoly_setBendGlideTime(tPoly *const poly, float t)</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:560</div></div>
<div class="ttc" id="agroup__tstack_html_ga995a3cb4b43476c387f4fd431af923ef"><div class="ttname"><a href="group__tstack.html#ga995a3cb4b43476c387f4fd431af923ef">tStack_getSize</a></div><div class="ttdeci">int tStack_getSize(tStack *const stack)</div><div class="ttdoc">Get the current size of the stack.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:200</div></div>
<div class="ttc" id="agroup__tpoly_html_ga9a3b088e0d32366b6d5f675794becf15"><div class="ttname"><a href="group__tpoly.html#ga9a3b088e0d32366b6d5f675794becf15">tPoly_initToPool</a></div><div class="ttdeci">void tPoly_initToPool(tPoly *const poly, int maxNumVoices, tMempool *const pool)</div><div class="ttdoc">Initialize a tPoly to a specified mempool.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:264</div></div>
<div class="ttc" id="agroup__tsimplepoly_html_ga1a55f7b4f9e8926acb9f6126c8e80633"><div class="ttname"><a href="group__tsimplepoly.html#ga1a55f7b4f9e8926acb9f6126c8e80633">tSimplePoly_isOn</a></div><div class="ttdeci">int tSimplePoly_isOn(tSimplePoly *const poly, uint8_t voice)</div><div class="ttdoc">Get the current play state of a given voice.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:896</div></div>
<div class="ttc" id="agroup__tsimplepoly_html_gaad03d289d4860fd6fc570e359da13f15"><div class="ttname"><a href="group__tsimplepoly.html#gaad03d289d4860fd6fc570e359da13f15">tSimplePoly_init</a></div><div class="ttdeci">void tSimplePoly_init(tSimplePoly *const poly, int maxNumVoices, LEAF *const leaf)</div><div class="ttdoc">Initialize a tSimplePoly to the default mempool of a LEAF instance.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:615</div></div>
<div class="ttc" id="agroup__tpoly_html_ga1f6a93b108ac8654eaa860575d2f1cd5"><div class="ttname"><a href="group__tpoly.html#ga1f6a93b108ac8654eaa860575d2f1cd5">tPoly_setBendSamplesPerTick</a></div><div class="ttdeci">void tPoly_setBendSamplesPerTick(tPoly *const poly, float t)</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:566</div></div>
<div class="ttc" id="agroup__tpoly_html_ga0a52befe767ed6ea96b26d53952a37ea"><div class="ttname"><a href="group__tpoly.html#ga0a52befe767ed6ea96b26d53952a37ea">tPoly_noteOn</a></div><div class="ttdeci">int tPoly_noteOn(tPoly *const poly, int note, uint8_t vel)</div><div class="ttdoc">Add a note with a given velocity to the poly handler.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:360</div></div>
<div class="ttc" id="agroup__tsimplepoly_html_gae147f59b6da64f3af94407da5a6ec3db"><div class="ttname"><a href="group__tsimplepoly.html#gae147f59b6da64f3af94407da5a6ec3db">tSimplePoly_getPitchAndCheckActive</a></div><div class="ttdeci">int tSimplePoly_getPitchAndCheckActive(tSimplePoly *const polyh, uint8_t voice)</div><div class="ttdoc">Returns negative one if the voice is inactive.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:884</div></div>
<div class="ttc" id="agroup__tsimplepoly_html_ga9a78b4407716cd48468420194f39d811"><div class="ttname"><a href="group__tsimplepoly.html#ga9a78b4407716cd48468420194f39d811">tSimplePoly_findVoiceAssignedToNote</a></div><div class="ttdeci">int tSimplePoly_findVoiceAssignedToNote(tSimplePoly *const polyh, uint8_t note)</div><div class="ttdoc">Find if there is a voice with that note – useful for note offs where you want to wait to remove it fr...</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:810</div></div>
<div class="ttc" id="agroup__tpoly_html_ga1f946c78feaa7db4f443bd105e4c7310"><div class="ttname"><a href="group__tpoly.html#ga1f946c78feaa7db4f443bd105e4c7310">tPoly_getVelocity</a></div><div class="ttdeci">int tPoly_getVelocity(tPoly *const poly, uint8_t voice)</div><div class="ttdoc">Get the current MIDI velocity of a given voice.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:596</div></div>
<div class="ttc" id="agroup__tstack_html_gac6a330c5c8f6fc6138b22c157e527c81"><div class="ttname"><a href="group__tstack.html#gac6a330c5c8f6fc6138b22c157e527c81">tStack_initToPool</a></div><div class="ttdeci">void tStack_initToPool(tStack *const stack, tMempool *const pool)</div><div class="ttdoc">Initialize a tStack to a specified mempool.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:28</div></div>
<div class="ttc" id="agroup__tsimplepoly_html_ga6d801960d20e16f81eff12b420a904c8"><div class="ttname"><a href="group__tsimplepoly.html#ga6d801960d20e16f81eff12b420a904c8">tSimplePoly_deactivateVoice</a></div><div class="ttdeci">void tSimplePoly_deactivateVoice(tSimplePoly *const polyh, uint8_t voice)</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:783</div></div>
<div class="ttc" id="agroup__tsimplepoly_html_ga12fc7c78f1e2fcd0016a438374eb4ec3"><div class="ttname"><a href="group__tsimplepoly.html#ga12fc7c78f1e2fcd0016a438374eb4ec3">tSimplePoly_noteOff</a></div><div class="ttdeci">int tSimplePoly_noteOff(tSimplePoly *const poly, uint8_t note)</div><div class="ttdoc">Remove a note from the poly handler.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:739</div></div>
<div class="ttc" id="agroup__tsimplepoly_html_ga85311b798b65407dcd4de68a8ed7d52d"><div class="ttname"><a href="group__tsimplepoly.html#ga85311b798b65407dcd4de68a8ed7d52d">tSimplePoly_getVelocity</a></div><div class="ttdeci">int tSimplePoly_getVelocity(tSimplePoly *const poly, uint8_t voice)</div><div class="ttdoc">Get the current MIDI velocity of a given voice.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:890</div></div>
<div class="ttc" id="agroup__tstack_html_ga559464a399b9606909f9f57e190ead7b"><div class="ttname"><a href="group__tstack.html#ga559464a399b9606909f9f57e190ead7b">tStack_remove</a></div><div class="ttdeci">int tStack_remove(tStack *const stack, uint16_t item)</div><div class="ttdoc">Remove a single instance of a value from the stack.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:138</div></div>
<div class="ttc" id="agroup__tsimplepoly_html_ga7927a37f0b05301c58923ee0bd9b1376"><div class="ttname"><a href="group__tsimplepoly.html#ga7927a37f0b05301c58923ee0bd9b1376">tSimplePoly_getNumActiveVoices</a></div><div class="ttdeci">int tSimplePoly_getNumActiveVoices(tSimplePoly *const poly)</div><div class="ttdoc">Get the number of voices currently playing notes.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:870</div></div>
<div class="ttc" id="agroup__tpoly_html_ga45962abd5bf3321cedfdb64ab05fd0d7"><div class="ttname"><a href="group__tpoly.html#ga45962abd5bf3321cedfdb64ab05fd0d7">tPoly_getNumActiveVoices</a></div><div class="ttdeci">int tPoly_getNumActiveVoices(tPoly *const poly)</div><div class="ttdoc">Get the number of voices currently playing notes.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:578</div></div>
<div class="ttc" id="agroup__tpoly_html_ga12e5fba9072b6e7d91d50a2e3c82bc87"><div class="ttname"><a href="group__tpoly.html#ga12e5fba9072b6e7d91d50a2e3c82bc87">tPoly_setPitchGlideTime</a></div><div class="ttdeci">void tPoly_setPitchGlideTime(tPoly *const poly, float t)</div><div class="ttdoc">Set how long pitch glide over note changes in voices takes.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:550</div></div>
<div class="ttc" id="agroup__tpoly_html_gaf3aae31d4b20eb71be39351989bc06d1"><div class="ttname"><a href="group__tpoly.html#gaf3aae31d4b20eb71be39351989bc06d1">tPoly_setNumVoices</a></div><div class="ttdeci">void tPoly_setNumVoices(tPoly *const poly, uint8_t numVoices)</div><div class="ttdoc">Set the number of voices available to play notes.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:538</div></div>
<div class="ttc" id="agroup__tpoly_html_gaf1bfa43e0337d0e090d3aa5b074b7825"><div class="ttname"><a href="group__tpoly.html#gaf1bfa43e0337d0e090d3aa5b074b7825">tPoly_tickPitchBend</a></div><div class="ttdeci">void tPoly_tickPitchBend(tPoly *const poly)</div><div class="ttdoc">Execute the tick-rate change of the poly handler's pitch bend.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:347</div></div>
<div class="ttc" id="agroup__tpoly_html_ga4391da808d7e621ac86944f745a2f729"><div class="ttname"><a href="group__tpoly.html#ga4391da808d7e621ac86944f745a2f729">tPoly_tickPitchGlide</a></div><div class="ttdeci">void tPoly_tickPitchGlide(tPoly *const poly)</div><div class="ttdoc">Execute the tick-rate change of the poly handler's pitch glide.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:338</div></div>
<div class="ttc" id="agroup__tpoly_html_gad85e4d10bb7e8fa66797ad632186459b"><div class="ttname"><a href="group__tpoly.html#gad85e4d10bb7e8fa66797ad632186459b">tPoly_getNumVoices</a></div><div class="ttdeci">int tPoly_getNumVoices(tPoly *const poly)</div><div class="ttdoc">Get the current number of voices available to play notes.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:572</div></div>
<div class="ttc" id="agroup__tstack_html_ga1684ca55f7c9d42e2994eed03b329700"><div class="ttname"><a href="group__tstack.html#ga1684ca55f7c9d42e2994eed03b329700">tStack_first</a></div><div class="ttdeci">int tStack_first(tStack *const stack)</div><div class="ttdoc">Get the first value in the stack.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:251</div></div>
<div class="ttc" id="agroup__tpoly_html_ga8608941b79fe9ba1b8e92b5a8046a915"><div class="ttname"><a href="group__tpoly.html#ga8608941b79fe9ba1b8e92b5a8046a915">tPoly_setPitchBend</a></div><div class="ttdeci">void tPoly_setPitchBend(tPoly *const poly, float pitchBend)</div><div class="ttdoc">Set the amount of pitch bend.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:353</div></div>
<div class="ttc" id="agroup__tsimplepoly_html_ga04edeaf26303e4fd57988b3144063590"><div class="ttname"><a href="group__tsimplepoly.html#ga04edeaf26303e4fd57988b3144063590">tSimplePoly_getPitch</a></div><div class="ttdeci">int tSimplePoly_getPitch(tSimplePoly *const poly, uint8_t voice)</div><div class="ttdoc">Get the current MIDI note number of a given voice.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:877</div></div>
<div class="ttc" id="agroup__tstack_html_ga3d053d583ed2c643a1a4ea00818d4f8a"><div class="ttname"><a href="group__tstack.html#ga3d053d583ed2c643a1a4ea00818d4f8a">tStack_clear</a></div><div class="ttdeci">void tStack_clear(tStack *const stack)</div><div class="ttdoc">Clear the stack.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:207</div></div>
<div class="ttc" id="agroup__tstack_html_ga15d80c513c339ff2c87fb96fcfca9353"><div class="ttname"><a href="group__tstack.html#ga15d80c513c339ff2c87fb96fcfca9353">tStack_get</a></div><div class="ttdeci">int tStack_get(tStack *const stack, int index)</div><div class="ttdoc">Get the value at a given index of the stack.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:245</div></div>
<div class="ttc" id="agroup__tstack_html_ga909528e236aa47978e91227961841ab5"><div class="ttname"><a href="group__tstack.html#ga909528e236aa47978e91227961841ab5">tStack_addIfNotAlreadyThere</a></div><div class="ttdeci">int tStack_addIfNotAlreadyThere(tStack *const stack, uint16_t item)</div><div class="ttdoc">Add a value to the stack only if that value is not already in the stack.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:94</div></div>
<div class="ttc" id="agroup__tsimplepoly_html_ga67391919fd2cf8b80b80b9a74f0a2f02"><div class="ttname"><a href="group__tsimplepoly.html#ga67391919fd2cf8b80b80b9a74f0a2f02">tSimplePoly_initToPool</a></div><div class="ttdeci">void tSimplePoly_initToPool(tSimplePoly *const poly, int maxNumVoices, tMempool *const pool)</div><div class="ttdoc">Initialize a tSimplePoly to a specified mempool.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:620</div></div>
<div class="ttc" id="agroup__tpoly_html_gaf530a73c1d8d8d3e20403c9f33c0ab2e"><div class="ttname"><a href="group__tpoly.html#gaf530a73c1d8d8d3e20403c9f33c0ab2e">tPoly_init</a></div><div class="ttdeci">void tPoly_init(tPoly *const poly, int maxNumVoices, LEAF *const leaf)</div><div class="ttdoc">Initialize a tPoly to the default mempool of a LEAF instance.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:259</div></div>
<div class="ttc" id="agroup__tpoly_html_gaec4318990ce680cc96df942fd9bd5473"><div class="ttname"><a href="group__tpoly.html#gaec4318990ce680cc96df942fd9bd5473">tPoly_getKey</a></div><div class="ttdeci">int tPoly_getKey(tPoly *const poly, uint8_t voice)</div><div class="ttdoc">Get the current MIDI note number of a given voice.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:590</div></div>
<div class="ttc" id="agroup__tstack_html_gabf348064227f55c30cd2bcac3d899881"><div class="ttname"><a href="group__tstack.html#gabf348064227f55c30cd2bcac3d899881">tStack_free</a></div><div class="ttdeci">void tStack_free(tStack *const stack)</div><div class="ttdoc">Free a tStack from its mempool.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:42</div></div>
<div class="ttc" id="astruct_l_e_a_f_html"><div class="ttname"><a href="struct_l_e_a_f.html">LEAF</a></div><div class="ttdoc">Struct for an instance of LEAF.</div><div class="ttdef"><b>Definition:</b> leaf-global.h:31</div></div>
<div class="ttc" id="agroup__tsimplepoly_html_gae112285fcb27b1b6822b5db474b892d7"><div class="ttname"><a href="group__tsimplepoly.html#gae112285fcb27b1b6822b5db474b892d7">tSimplePoly_free</a></div><div class="ttdeci">void tSimplePoly_free(tSimplePoly *const poly)</div><div class="ttdoc">Free a tSimplePoly from its mempool.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:647</div></div>
<div class="ttc" id="agroup__tsimplepoly_html_gae11bb769f332621148bfe4e9e966cc1d"><div class="ttname"><a href="group__tsimplepoly.html#gae11bb769f332621148bfe4e9e966cc1d">tSimplePoly_setNumVoices</a></div><div class="ttdeci">void tSimplePoly_setNumVoices(tSimplePoly *const poly, uint8_t numVoices)</div><div class="ttdoc">Set the number of voices available to play notes.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:857</div></div>
<div class="ttc" id="agroup__tsimplepoly_html_ga668c915adab45224835268b08c7f4c80"><div class="ttname"><a href="group__tsimplepoly.html#ga668c915adab45224835268b08c7f4c80">tSimplePoly_markPendingNoteOff</a></div><div class="ttdeci">int tSimplePoly_markPendingNoteOff(tSimplePoly *const polyh, uint8_t note)</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:828</div></div>
<div class="ttc" id="agroup__tstack_html_ga6e0aef2c8bc0f9432b7a2a6541f21550"><div class="ttname"><a href="group__tstack.html#ga6e0aef2c8bc0f9432b7a2a6541f21550">tStack_next</a></div><div class="ttdeci">int tStack_next(tStack *const stack)</div><div class="ttdoc">Get the next value in the stack, starting from the earliest added values.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:220</div></div>
<div class="ttc" id="agroup__tpoly_html_ga5abdfc6cd4b26b74647cb23a822b0f38"><div class="ttname"><a href="group__tpoly.html#ga5abdfc6cd4b26b74647cb23a822b0f38">tPoly_orderedAddToStack</a></div><div class="ttdeci">void tPoly_orderedAddToStack(tPoly *const poly, uint8_t note)</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:498</div></div>
<div class="ttc" id="agroup__tstack_html_ga8ca0bdad1bce63d0da4cfa6e233ece98"><div class="ttname"><a href="group__tstack.html#ga8ca0bdad1bce63d0da4cfa6e233ece98">tStack_contains</a></div><div class="ttdeci">int tStack_contains(tStack *const stack, uint16_t item)</div><div class="ttdoc">Check if the stack contains a value, and if it does, get the index of that value.</div><div class="ttdef"><b>Definition:</b> leaf-midi.c:50</div></div>
<!-- HTML footer for doxygen 1.8.18-->
<!-- start footer part -->
</body>
</html>
